package com.niodata.dp.task.entity;

import java.util.Date;

/**
 * job exec instance data info,runtime params,output params.
 */
public class JobExecData {

  private String taskName;
  private String taskId;
  private String execId;
  private String jobId;
  private String jobName;
  private JobParams params;
  private JobParams outParams;
  private Date createTime;

  public String getJobName() {
    return jobName;
  }

  public void setJobName(String jobName) {
    this.jobName = jobName;
  }

  public String getTaskId() {
    return taskId;
  }

  public void setTaskId(String taskId) {
    this.taskId = taskId;
  }

  public String getJobId() {
    return jobId;
  }

  public void setJobId(String jobId) {
    this.jobId = jobId;
  }


  public String getExecId() {
    return execId;
  }

  public void setExecId(String execId) {
    this.execId = execId;
  }

  public JobParams getParams() {
    return params;
  }

  public void setParams(JobParams params) {
    this.params = params;
  }

  public JobParams getOutParams() {
    return outParams;
  }

  public void setOutParams(JobParams outParams) {
    this.outParams = outParams;
  }

  public String getTaskName() {
    return taskName;
  }

  public void setTaskName(String taskName) {
    this.taskName = taskName;
  }

  public Date getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }

  public Object getParamValue(String name) {
    if (params != null && params.getParams().size() > 0) {
      return params.getParams().get(name);
    }
    return null;
  }

  public Object getOutParamValue(String name) {
    if (outParams != null && outParams.getParams().size() > 0) {
      return outParams.getParams().get(name);
    }
    return null;
  }
}
